This invention relates to a method of modulating and demodulating digital data and also to a digital data modulator/demodulator.
Various methods have been developed for modulating digital data to be recorded on a recording medium in an attempt to make the modulating method adapted to the characteristics of the recording medium. Specifically, in the field of magnetic recording, each original data is typically converted and modulated into a code according to a rule for minimizing the DC components and the number of consecutive bits with a same polarity such as 8-10 modulation or 8-14 modulation before it is recorded.
Jpn. Pat. Appln. KOKAI Publication No. 52-11916 proposes a modulation method of converting a piece of data into a code having no DC component by allowing the number of bits thereof to have a certain degree of redundancy. For example, it discloses a technique of selecting 16 codes out of 20 6-bit codes having no DC component in order to establish a one-to-one correspondence between them and 16 4-bit codes.
Jpn. Pat. Appln. KOKAI Publication No. 60-12840 proposes a method of converting 4-bit data into 6-bit data. With the proposed method, out of 64 different 6-bit data, 16 having no three or more than three consecutive "1"s or "0"s will be selected. For instance, a logic circuit may be used to convert 4-bit data into 6-bit data of the type as described above. The proposed method uses a convert table for obtaining 6-bit data where the number of "1"s is odd and whose least significant bit is generated by means of odd parity of the remaining 5 bits. Additionally, if there appear 4 consecutive "1"s or "0"s as a result of coupling modulation codes, using odd parity, the number of consecutive "1"s or "0"s is reduced to 2 by means of bit inversion.
On the other hand, the applicant of the present patent application proposed in EP 0 670 555 A1 (corresponding to U.S. Ser. No. 08/407,018, now issued as U.S. Pat. No. 5,896,403) a set of dot codes arranged in the form of an optically readable code pattern and recorded on a recording medium such as a sheet of paper and an apparatus for reproducing the recorded dot codes by scanning the pattern. According to this invention, dot codes are modulated before being recorded in such a way that given data are transformed into a pattern of dot codes different from any marker (which consists of a predetermined number of consecutive black dots on the sheet of paper operating as the recording medium). When a marker is recorded as a number of consecutive black dots, the modulated data (a dot image pattern) may contain any number of consecutive white dots. Thus, the applicant of the present patent application proposed a modulation method for limiting the number of consecutive black dots in a dot image pattern, disregarding the number of consecutive white dots in EP 0 765 041 A2 (corresponding to U.S. Ser. No. 08/696,003, now issued as U.S. Pat. No. 5,835,309).
With any of the above described modulation methods, modulation codes are arranged in the form of a table adapted to correspond to all input data strings and stored in a ROM (read only memory).
When reproduced, the modulation codes can violate the modulation rule due to errors in the magneto-electric transformation system when a magnetic recording medium is used or in the image pick-up system (including the use of a binarization process) if a recording system of recording data on a sheet of paper is used. U.S. Pat. No. 5,406,569 describes a method for reducing such errors. The disclosed system will be summarily discussed below.
A modulation code that violates the rule is compared with each of the modulated reference codes prepared on the basis of all the modulation codes in the demodulation table for 1 to 1 correspondence to determine the Hamming distance between itself and the modulated reference code and the modulation code that is violating the rule is transformed into the modulated reference code showing the shortest Hamming distance to it. If there are found two or more than two modulated reference codes that show a same Hamming distance to the violator, each of the bits of the modulation code is weighted on the basis of the probability of occurrence of an error of the bit and the competing reference codes are examined in terms of the weighted bits to determine the modulated reference code showing the shortest Hamming distance to the violator in order to improve the error correction capability.
However, with the method as disclosed in the above cited U.S. Pat. No. 5,406,569, there can remain more than one modulated reference codes that shows a same Hamming distance to the violator after the weighting operation. Then, the method is helpless for error correction and can only detect errors. Additionally, the above discussed method is rather cumbersome because it has to determine the Hamming distance between a modulation code detected as a rule violator and each of the modulated reference does.
The above cited Jpn. Pat. Appln. KOKAI Publication No. 52-11916 describes a method of detecting a modulation code that violates the modulation rule by means of the redundancy inherent to the modulation code. Again, however, this method is helpless for error correction and can only detect errors. Jpn. Pat. Appln. KOKAI Publication No. 62-12840 also discloses a method of detecting errors by means of odd parity that cannot correct errors either. Particularly, this method becomes helpless even for error detection if the parity bit is inverted when two modulation codes are coupled to produce four consecutive "1"s or "0"s.